package com.jeez.module.sys.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import com.jeez.common.entity.BaseEntity;
import com.jeez.common.entity.DataEntity;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author: Felix
 * @date: 2018-7-1
 * @version: v1.0
 * @description: 用户扩展信息
 */
@Entity
@Table(name = "t_sys_user_ext")
@Getter
@Setter
public class SysUserExt extends BaseEntity<SysUserExt> {

    /**
     * 头像
     */
    @Column(name = "profile")
    private String profile;

    /**
     * 上级
     */
    @Column(name = "leader")
    private String leader;

    /**
     * 入职日期
     */
    @Column(name = "offer_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date offerDate;


    /**
     * 就职状态
     */
    @Column(name = "offer_status")
    private String offerStatus;

    /**
     * 试用期限
     */
    @Column(name = "tryout")
    private String tryout;


    /**
     * 转正日期
     */
    @Column(name = "transfer_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date transferDate;

    /**
     * 离职日期
     */
    @Column(name = "leave_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date leaveDate;


    /**
     * 性别
     */
    @Column(name = "sex")
    private String sex;

    /**
     * 出生日期
     */
    @Column(name = "borth_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date borthDate;

    /**
     * 最高学历
     */
    @Column(name = "school_record")
    private String schoolRecord;


    /**
     * 身份证号
     */
    @Column(name = "card_no")
    private String cardNo;


    /**
     * 工作地址
     */
    @Column(name = "work_address")
    private String workAddress;

    /**
     * 家庭地址
     */
    @Column(name = "home_address")
    private String homeAddress;


    /**
     * 员工级别
     */
    @Column(name = "band")
    private String band;

    /**
     * 职位
     */
    @Column(name = "office")
    private String office;

    /**
     * 岗位
     */
    @Column(name = "post_id")
    private String postId;

    @Column(name = "qr_code", length = 100)
    private String qrCode;	//二维码

    @Column(name = "sign", length = 1000)
    private String sign;//签名

    @OneToOne(mappedBy = "userExt")
    private SysUser sysUser;

}
